<div class="row">
  <div class="col-md-6 col-sm-8 col-sm-push-2">
    <form class="form form-horizontal" [formGroup]="rulesForm">
      <div class="one-form-header"></div>
      <div class="one-form-body">
        <div class="form-group">
          <label for="rule_add_ruleName" class="col-sm-4 control-label">规则名称:</label>
          <div class="col-sm-8">
            <input type="text" class="form-control" placeholder="规则名称" id="rule_add_ruleName" name="ruleName"
                   required formControlName="ruleName">
            <div *ngIf="formErrors.ruleName" class="has-error">
              <label class="control-label"><i class="fa fa-times-circle-o"></i>{{formErrors.ruleName}} </label>
            </div>
          </div>
        </div>
        <div class="form-group">
          <label for="rule_add_operation" class="col-sm-4 control-label">操作:</label>
          <div class="col-sm-8">
            <input type="text" class="form-control" placeholder="操作" id="rule_add_operation" name="operation"
                   formControlName="operation">
          </div>
        </div>

        <div class="form-group">
          <label for="rule_add_value" class="col-sm-4 control-label">比较值:</label>
          <div class="col-sm-8">
            <input type="text" class="form-control" placeholder="比较值" id="rule_add_value" name="value"
                   formControlName="value">
          </div>
        </div>

        <div class="row">
          <label class="col-sm-4 control-label">是否有效:</label>
          <div class="col-sm-8">
            <div class="row">
              <div class="col-xs-4">
                <input type="radio" name="isUse" id="rule_add_Use" value="1" formControlName="isUse">
                <label for="rule_add_Use">
                  有效
                </label>
              </div>
              <div class="col-xs-4">
                <input type="radio" name="isUse" id="rule_add_inUse" value="0" checked formControlName="isUse">
                <label for="rule_add_inUse">
                  无效
                </label>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="one-form-footer">
        <div class="pull-right">
          <button class="btn btn-default" type="reset" (click)="cancelRuleAdd()">取消</button>
          <button class="btn btn-success" type="button" [disabled]="rulesForm.invalid" (click)="onSubmit()">提交
          </button>
        </div>
      </div>
    </form>
  </div>
</div>
